package com.example.goods_service.service;

import com.example.goods_service.dao.GoodsDao_liujingxi;
import com.example.goods_service.dao.GoodsDao_liuyubin;
import com.example.goods_service.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl_liuyubin implements GoodsService_liuyubin{

    @Autowired
    GoodsDao_liuyubin goodsDao_liuyubin;

    //评论单
    @Override
    public int gradedan(int id) {
        return goodsDao_liuyubin.gradedan(id);
    }
    //查询用户
    @Override
    public List<T_user> user() {
        return goodsDao_liuyubin.user();
    }

    //评论数量
    @Override
    public List<T_user_content_quantity> grade(int id) {
        return goodsDao_liuyubin.grade(id);
    }
    //评论内容
    @Override
    public List<T_user_content> gradehzh(int id) {
        return goodsDao_liuyubin.gradehzh(id);
    }
    //全部评论
    @Override
    public List<T_user_content> selectqbpl() {
        return goodsDao_liuyubin.selectqbpl();
    }
    //商家回复
    @Override
    public List<T_shop_reply> selectshoppj() {
        return goodsDao_liuyubin.selectshoppj();
    }

    //商家浏览
    @Override
    public List<T_user_content> selectshopliul(int id) {
        return goodsDao_liuyubin.selectshopliul(id);
    }

    @Override
    public List<T_user_content> gradehzh2(int id, int grade) {
        return goodsDao_liuyubin.gradehzh2(id, grade);
    }
    //子评论
    @Override
    public List<T_user_reply> zpl() {
        return goodsDao_liuyubin.zpl();
    }
    //添加子评论
    @Override
    public boolean insertreply(int commodity_id, int user_id, int comment_id, String replu_content) {
        return goodsDao_liuyubin.insertreply(commodity_id, user_id, comment_id, replu_content);
    }
    //查询商家回复
    @Override
    public List<T_shop_reply> selectshopreply(int id) {
        return goodsDao_liuyubin.selectshopreply(id);
    }
    //全部好评数
    @Override
    public int selectqbhp(int id) {
        return goodsDao_liuyubin.selectqbhp(id);
    }
    //修改浏览状态
    @Override
    public boolean update(int id, int status) {
        return goodsDao_liuyubin.update(id, status);
    }

    @Override
    public List<T_user_content> huifsel(int id) {
        return goodsDao_liuyubin.huifsel(id);
    }

    @Override
    public boolean insert(int sp, int shop, int user, String reply, int commentid) {
        return goodsDao_liuyubin.insert(sp, shop, user, reply, commentid);
    }

    @Override
    public List<T_user_content> mhcx(String value) {
        return goodsDao_liuyubin.mhcx(value);
    }
}
